package com.erp.auto.service;


import com.erp.auto.domain.ErpAutoPulishProductProject;
import com.ruoyi.gather.api.domain.dto.AeAutoProductDto;
import com.ruoyi.auto.api.domain.ErpAutoPulishProductProjectTask;
import com.ruoyi.common.core.domain.R;

import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

/**
 * 自动化上架计划Service接口
 *
 * @author erp
 * @date 2023-12-25
 */
public interface IErpAutoPulishProductProjectTaskService {
    
    // 判断有无自动化上品任务
    Boolean getTaskByProductId(Long aeProductId);

//    R<Object> runPulishProductProjectTaskJob(String id, String projectId);


    /**
     * 根据上架计划上传商品至速卖通
     * @param task
     * @return
     */
    Future<AeAutoProductDto> runPublishProductToAe(ErpAutoPulishProductProjectTask task);

    AeAutoProductDto reissueMessageQueue(ErpAutoPulishProductProjectTask task);

    /**
     * 获取当前时间之前的所有未执行的上架计划
     * @param id
     * @return
     */
    R<Object> updatePublishTaskStatusByCurrentTime(String id);

    R<Object> updateTaskStatus(String id, Integer status, String msg);

    R<Object> deleteTortListByCollectProductId(String collectProductId);

    R<Object> setCommissionAgainOne();

    R<Object> setCommissionAgainTwo();



    R<Object> queryRepeatPublishErrorByStoreId(Long storeId);

    R<Object> queryRepeatPublishErrorAllStore();

    R<Object> unshelfRepeatErrorTaskAllStore();

    R<Object> deleteRepeatErrorTaskAllStore();

    R<Object> runPublishTestProductToAe(Long collectProductId,Integer type);

    R<Object> checkActivityErrorHandle();
}
